<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

<ui:composition>
    <p:dialog header="Editar modem" widgetVar="edit_modem" resizable="false" showEffect="clip" hideEffect="clip" modal="true" position="top" width="440">
        <h:panelGrid id="panel_edit_modem" columns="2" style="margin-bottom:10px">
            <h:outputLabel value="Company" />
            <h:selectOneMenu value="#{editModemMBean.updateCompanySelected}">
                <f:selectItems value="#{editModemMBean.menuCompany}"/>
            </h:selectOneMenu>

            <h:outputLabel value="Login" />
            <h:selectOneMenu value="#{editModemMBean.updateLoginSelected}">
                <f:selectItems value="#{editModemMBean.menuLogin}"/>
            </h:selectOneMenu>

            <h:outputLabel value="Operadora" />
            <h:selectOneMenu value="#{editModemMBean.updateCarrierSelected}">
                <f:selectItems value="#{editModemMBean.menuCarrier}"/>
            </h:selectOneMenu>

            <h:outputLabel value="Nome" />
            <h:inputText value="#{editModemMBean.selectedModem.name}"/>

            <h:outputLabel value="Rota" />
            <h:inputText value="#{editModemMBean.selectedModem.smscRoute}"/>

            <h:outputLabel value="Telefone" />
            <h:inputText value="#{editModemMBean.selectedModem.phone}"/>

            <h:outputLabel value="Funcionando" />
            <h:selectBooleanCheckbox value="#{editModemMBean.selectedModem.working}" />
        </h:panelGrid>
        <br/>
        <p:commandButton value="Confirmar" update="growl, dataTableModem" actionListener="#{editModemMBean.update}" oncomplete="edit_modem.hide();"/>
        <p:commandButton value="Cancelar" oncomplete="edit_modem.hide();"/>
    </p:dialog>
</ui:composition>
</html>